home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
webbro1a
/
wtypes.idl
< prev
Wrap
Text File
|
1999-06-23
|
46KB
|
1,513 lines
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright 1992 - 1998 Microsoft Corporation.
//
// File: wtypes.idl
//
// Contents: This interface definition contains typedefs for remotable
// data types.
//
// History: 09-May-96 MikeHill Updated VARENUM comments.
// 22-May-96 MikeHill Added FMTID defintions/macros.
// 06-Jun-96 MikeHill Added CBPCLIPDATA macro.
//
//--------------------------------------------------------------------------
cpp_quote("//+-------------------------------------------------------------------------")
cpp_quote("//")
cpp_quote("// Microsoft Windows")
cpp_quote("// Copyright 1992 - 1998 Microsoft Corporation.")
cpp_quote("//")
cpp_quote("//--------------------------------------------------------------------------")
[ uuid(D3980A60-910C-1068-9341-00DD010F2F1C),
version(0.1), pointer_default(unique) ]
interface IWinTypes
{
typedef struct tagRemHGLOBAL
{
long fNullHGlobal;
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHGLOBAL;
typedef struct tagRemHMETAFILEPICT
{
long mm;
long xExt;
long yExt;
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHMETAFILEPICT;
typedef struct tagRemHENHMETAFILE
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHENHMETAFILE;
typedef struct tagRemHBITMAP
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHBITMAP;
typedef struct tagRemHPALETTE
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHPALETTE;
typedef struct tagRemBRUSH
{
unsigned long cbData;
[size_is(cbData)] byte data[];
} RemHBRUSH;
cpp_quote("#if !defined(_WIN32) && !defined(_MPPC_)" )
cpp_quote("// The following code is for Win16 only")
cpp_quote("#ifndef WINAPI // If not included with 3.1 headers...")
cpp_quote("#define FAR _far")
cpp_quote("#define PASCAL _pascal")
cpp_quote("#define CDECL _cdecl")
cpp_quote("#define VOID void")
cpp_quote("#define WINAPI FAR PASCAL")
cpp_quote("#define CALLBACK FAR PASCAL")
cpp_quote("#ifndef FALSE")
cpp_quote("#define FALSE 0")
cpp_quote("#define TRUE 1")
cpp_quote("#endif // !FALSE")
cpp_quote("#ifndef _BYTE_DEFINED")
cpp_quote("#define _BYTE_DEFINED")
typedef unsigned char BYTE;
cpp_quote("#endif // !_BYTE_DEFINED")
cpp_quote("#ifndef _WORD_DEFINED")
cpp_quote("#define _WORD_DEFINED")
typedef short WORD;
cpp_quote("#endif // !_WORD_DEFINED")
typedef int UINT;
typedef int INT;
typedef long BOOL;
cpp_quote("#ifndef _LONG_DEFINED")
cpp_quote("#define _LONG_DEFINED")
typedef long LONG;
cpp_quote("#endif // !_LONG_DEFINED")
cpp_quote("#ifndef _WPARAM_DEFINED")
cpp_quote("#define _WPARAM_DEFINED")
typedef UINT WPARAM;
cpp_quote("#endif // _WPARAM_DEFINED")
cpp_quote("#ifndef _DWORD_DEFINED")
cpp_quote("#define _DWORD_DEFINED")
typedef long DWORD;
cpp_quote("#endif // !_DWORD_DEFINED")
cpp_quote("#ifndef _LPARAM_DEFINED")
cpp_quote("#define _LPARAM_DEFINED")
typedef LONG LPARAM;// this should be a discriminated union.
cpp_quote("#endif // !_LPARAM_DEFINED")
cpp_quote("#ifndef _LRESULT_DEFINED")
cpp_quote("#define _LRESULT_DEFINED")
typedef LONG LRESULT;
cpp_quote("#endif // !_LRESULT_DEFINED")
typedef void * HANDLE;
#define DECLARE_WIREM_HANDLE(name) \
typedef [wire_marshal(wire ## name)] void * name
#define DECLARE_HANDLE(name) typedef void * name
DECLARE_HANDLE(HMODULE);
DECLARE_HANDLE(HINSTANCE);
DECLARE_HANDLE(HRGN);
DECLARE_HANDLE(HTASK);
DECLARE_HANDLE(HKEY);
DECLARE_HANDLE(HDESK);
DECLARE_HANDLE(HMF);
DECLARE_HANDLE(HEMF);
DECLARE_HANDLE(HPEN);
DECLARE_HANDLE(HRSRC);
DECLARE_HANDLE(HSTR);
DECLARE_HANDLE(HWINSTA);
DECLARE_HANDLE(HKL);
DECLARE_HANDLE(HGDIOBJ);
typedef HANDLE HDWP;
cpp_quote("#ifndef _HFILE_DEFINED")
cpp_quote("#define _HFILE_DEFINED")
typedef INT HFILE; /* Polymorphic with C runtime file handle type */
cpp_quote("#endif // !_HFILE_DEFINED")
cpp_quote("#ifndef _LPWORD_DEFINED")
cpp_quote("#define _LPWORD_DEFINED")
typedef WORD *LPWORD;
cpp_quote("#endif // !_LPWORD_DEFINED")
cpp_quote("#ifndef _LPDWORD_DEFINED")
cpp_quote("#define _LPDWORD_DEFINED")
typedef DWORD *LPDWORD;
cpp_quote("#endif // !_LPDWORD_DEFINED")
typedef char CHAR;
typedef [string] CHAR *LPSTR;
typedef [string] const CHAR *LPCSTR;
cpp_quote("#ifndef _WCHAR_DEFINED")
cpp_quote("#define _WCHAR_DEFINED")
typedef wchar_t WCHAR;
typedef WCHAR TCHAR;
cpp_quote("#endif // !_WCHAR_DEFINED")
typedef [string] WCHAR *LPWSTR;
typedef [string] TCHAR *LPTSTR;
typedef [string] const WCHAR *LPCWSTR;
typedef [string] const TCHAR *LPCTSTR;
typedef struct tagPALETTEENTRY {
BYTE peRed;
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
} PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
// Logical Palette
cpp_quote("#if 0")
typedef struct tagLOGPALETTE {
WORD palVersion;
WORD palNumEntries;
[size_is(palNumEntries)] PALETTEENTRY palPalEntry[];
} LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;
cpp_quote("#else")
cpp_quote("typedef struct tagLOGPALETTE {")
cpp_quote(" WORD palVersion;")
cpp_quote(" WORD palNumEntries;")
cpp_quote(" PALETTEENTRY palPalEntry[1];")
cpp_quote("} LOGPALETTE, *PLOGPALETTE, *LPLOGPALETTE;")
cpp_quote("#endif")
cpp_quote("#ifndef _COLORREF_DEFINED")
cpp_quote("#define _COLORREF_DEFINED")
typedef DWORD COLORREF;
cpp_quote("#endif // !_COLORREF_DEFINED")
cpp_quote("#ifndef _LPCOLORREF_DEFINED")
cpp_quote("#define _LPCOLORREF_DEFINED")
typedef DWORD *LPCOLORREF;
cpp_quote("#endif // !_LPCOLORREF_DEFINED")
typedef HANDLE *LPHANDLE;
//typedefs for remotable types from wingdi.h
typedef struct _RECTL
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECTL, *PRECTL, *LPRECTL;
typedef struct tagPOINT
{
LONG x;
LONG y;
} POINT, *PPOINT, *LPPOINT;
typedef struct _POINTL
{
LONG x;
LONG y;
} POINTL, *PPOINTL;
cpp_quote("#ifndef WIN16")
typedef struct tagSIZE
{
LONG cx;
LONG cy;
} SIZE, *PSIZE, *LPSIZE;
cpp_quote("#else // WIN16")
cpp_quote("typedef struct tagSIZE")
cpp_quote("{")
cpp_quote(" INT cx;")
cpp_quote(" INT cy;")
cpp_quote("} SIZE, *PSIZE, *LPSIZE;")
cpp_quote("#endif // WIN16")
typedef struct tagSIZEL
{
LONG cx;
LONG cy;
} SIZEL, *PSIZEL, *LPSIZEL;
cpp_quote("#endif //WINAPI")
cpp_quote("#endif //!WIN32 && !MPPC")
cpp_quote("#if defined(_WIN32) && !defined(OLE2ANSI)")
typedef WCHAR OLECHAR;
typedef [string] OLECHAR *LPOLESTR;
typedef [string] const OLECHAR *LPCOLESTR;
cpp_quote("#define OLESTR(str) L##str")
cpp_quote("")
cpp_quote("#else")
cpp_quote("")
cpp_quote("typedef char OLECHAR;")
cpp_quote("typedef LPSTR LPOLESTR;")
cpp_quote("typedef LPCSTR LPCOLESTR;")
cpp_quote("#define OLESTR(str) str")
cpp_quote("#endif")
// This block contains types that are normally defined by the nt sdk in WINDEF.H
// but we need them here for definitions that follow in this file. If WINDEF.H
// hasn't been included then we need to define them now so that WTYPES.H
// will compile.
cpp_quote("#ifndef _WINDEF_")
typedef const RECTL *LPCRECTL;
typedef void * PVOID, * LPVOID;
typedef float FLOAT;
typedef struct tagRECT
{
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT, *PRECT, *LPRECT;
typedef const RECT *LPCRECT;
cpp_quote("#endif //_WINDEF_")
typedef unsigned char UCHAR;
typedef short SHORT;
typedef unsigned short USHORT;
typedef DWORD ULONG;
typedef double DOUBLE;
cpp_quote("#ifndef _DWORDLONG_")
typedef unsigned __int64 DWORDLONG;
typedef